package com.sun.androidexerciseproject.function.util;

import android.util.Log;

/**
 * Created by Administrator on 2016/5/24 0024.
 */
public class LogUtil {
    private static final String TAG = "junfutong";
    private static boolean Debug = true;
//    private static final DocumentReference DOCUMENT_REFERENCE = FirebaseFirestore.getInstance().document("sampleData/inspiration");

    public static void log(String content) {
        if (Debug) {
            Log.d(TAG, content);
        }
    }

//    private static class NewRunnable implements Runnable {
//        public NewRunnable(String content) {
//            mContent = content;
//        }
//
//        private String mContent;
//
//        @Override
//        public void run() {
//            if (null != DOCUMENT_REFERENCE) {
//                long threadId = Thread.currentThread().getId();
//                Log.d(TAG, "threadId " + threadId);
//                Map<String, Object> dataToSave = new HashMap<>(1);
//                dataToSave.put("userName", "zhangsan");
//                dataToSave.put("age", "13");
//                DOCUMENT_REFERENCE.set(dataToSave).addOnSuccessListener(new OnSuccessListener<Void>() {
//                    @Override
//                    public void onSuccess(Void aVoid) {
//                        Log.d(TAG, "onSuccess!!!");
//                    }
//                }).addOnFailureListener(new OnFailureListener() {
//                    @Override
//                    public void onFailure(@NonNull Exception e) {
//                        Log.d(TAG, "onFailure!!!");
//                    }
//                });
//                Log.d(TAG, "threadId2 " + threadId);
//            }
//        }
//    }
}
